<?php
if(!defined('ADMINPX') || !defined('ADMIN')) {
	exit('Access Denied');
}
$act=$_GET['act'];
$id=$_GET['id'];
$uid=$_GET['uid'];
if($act=='ok'){
	if($_GET['lx'] == 'mobile'){
     $db->update('user',array( 'mobile_d' => $_POST[name] )," `uid` =$uid");
     if($_POST[name]){
	      Bingz_message_post('0',$uid,'恭喜你！你提交的手机号认证成功！');
	   }else{
	      Bingz_message_post('0',$uid,'你提交的手机号认证失败！');
	   }
  }elseif($_GET['lx'] == 'email'){
     $db->update('user',array( 'email_d' => $_POST[name] )," `uid` =$uid");
     if($_POST[name]){
	      Bingz_message_post('0',$uid,'恭喜你！你提交的邮箱认证成功！');
	   }else{
	      Bingz_message_post('0',$uid,'你提交的邮箱认证失败！');
	   }
  }elseif($_GET['lx'] == 'qq'){
     $db->update('user',array( 'qq_d' => $_POST[name] )," `uid` =$uid");
     if($_POST[name]){
	      Bingz_message_post('0',$uid,'恭喜你！你提交的QQ号认证成功！');
	   }else{
	      Bingz_message_post('0',$uid,'你提交的QQ认证失败！');
	   }
  }elseif($_GET['lx'] == 'smz'){
     $db->update('user',array( 'smz' => $_POST[name],'smz_d' => $_POST[smz] )," `uid` =$_POST[uid]");
     if($_POST[name]){
	      Bingz_message_post('0',$uid,'恭喜你！你的实名认证成功！');
	   }else{
	      Bingz_message_post('0',$uid,'你提交的实名认证失败！');
	   }
  }
	 echo "提交成功<br/>";
   echo "正在自动返回.......<br/><a href=\"admin.php?action=user_renzheng&\">请手动返回</a><br/><meta http-equiv=refresh content='3;url=admin.php?action=user_renzheng&'>";
}elseif($act=='user'){
echo '<div class="admin">会员('.$id.')银行账号<br/></div>';
   $num_count=$db->num_rows('user_renminbi_zh',"`uid` ='$uid' ",'id');
   $sql_bbs  =$db->query('user_renminbi_zh',"`uid` ='$uid' ORDER BY `id` ",'');
   while($row_c=mysql_fetch_array($sql_bbs)){
   	   $user_name  =$user_class->user_name($row_c['uid']);
   	   $uses=$db->get_one('user',"`uid` ='$row_c[uid]' and `mobile_d` ='1' " ,'');
       echo"<div class=\"admin_a\">用户：<a href=\"index.php?$Bingz_ml=user&uid=$row_c[uid]\">$user_name</a><br/>用户手机：$uses[mobile]<br/>银行账号：<font color=\"#ff0000\">$row_c[name]-$row_c[name_lx]-$row_c[zh]</font><br/>";
echo'<form method="POST" action="admin.php?action=user_bdzh&act=ok&id='.$row_c[id].'">
审核提示:
     <input type="radio" name="name" value="2" />删除
<input class="submit" type="submit" name="B1" value="提交"/>
</form>
       </div>';
   }
   if($num_count == '0'){
   	  echo '<div class="admin_a">没有数据！</div>';
   }
}elseif($act=='smsok'){
	 if(!$_POST[adminpost]){
	   echo"提交出错<br/>";
	 }elseif($_GET[yzlx] == 'smz'){
	 	$db->update('user',array( 'smz' => $_POST[smz],'smz_name' => $_POST[name],'smz_d' => $_POST[smz_d] )," `uid` =$uid");
	  echo "提交成功<br/>";
	 }elseif($_GET[yzlx] == 'qq'){
	 	$db->update('user',array( 'qq' => $_POST[qq],'qq_d' => $_POST[qq_d] )," `uid` =$uid");
	  echo "提交成功<br/>";
	 }elseif($_GET[yzlx] == 'email'){
	 	$db->update('user',array( 'email' => $_POST[email],'email_d' => $_POST[email_d] )," `uid` =$uid");
	  echo "提交成功<br/>";
	 }elseif($_GET[yzlx] == 'mobile'){
	 	$db->update('user',array( 'mobile' => $_POST[mobile],'mobile_d' => $_POST[mobile_d] )," `uid` =$uid");
	  echo "提交成功<br/>";
	 }
   echo "正在自动返回.......<br/><a href=\"admin.php?action=user_renzheng&act=sms&uid=$uid\">请手动返回</a><br/><meta http-equiv=refresh content='3;url=admin.php?action=user_renzheng&act=sms&uid=$uid'>";
}elseif($act=='sms'){
$uses=$db->get_one('user',"`uid` ='$uid'" ,'');
if($uses[smz_d] == '1'){ $a="CHECKED "; }else{ $b="CHECKED "; }
echo '<div class="admin_b"><b>用户uid</b>：'.$uses[name].'('.$uid.')<br/></div><div class="admin">实名认证管理<br/></div>';
echo'<form method="POST" action="admin.php?action=user_renzheng&act=smsok&uid='.$uid.'&yzlx=smz">
<b>认证设置</b>:
     <input type="radio" '.$a.' name="smz_d" value="1" />认证
     <input type="radio" '.$b.' name="smz_d" value="0" />未认证<br/>
<b>姓          名</b>：<input type="text" placeholder="请填写姓名" name="name" class="text_x" value="'.$uses[smz_name].'"/><br/>
<b>身份证号</b>：<input type="text" placeholder="请填写身份证号码" name="smz" class="smz" value="'.$uses[smz].'"/><br/>
<input class="submit" type="submit" name="adminpost" value="提交"/>
</form>
</div>';

if($uses[qq_d] == '1'){ $aa="CHECKED "; }else{ $bb="CHECKED "; }
echo '<div class="admin">qq认证管理<br/></div>';
echo'<form method="POST" action="admin.php?action=user_renzheng&act=smsok&uid='.$uid.'&yzlx=qq">
<b>认证设置</b>:
     <input type="radio" '.$aa.' name="qq_d" value="1" />认证
     <input type="radio" '.$bb.' name="qq_d" value="0" />未认证<br/>
<b>qq号</b>：<input type="text" placeholder="请填写qq号" name="qq" class="smz" value="'.$uses[qq].'"/><br/>
<input class="submit" type="submit" name="adminpost" value="提交"/>
</form>
</div>';

if($uses[email_d] == '1'){ $aaa="CHECKED "; }else{ $bbb="CHECKED "; }
echo '<div class="admin">邮箱认证管理<br/></div>';
echo'<form method="POST" action="admin.php?action=user_renzheng&act=smsok&uid='.$uid.'&yzlx=email">
<b>认证设置</b>:
     <input type="radio" '.$aaa.' name="email_d" value="1" />认证
     <input type="radio" '.$bbb.' name="email_d" value="0" />未认证<br/>
<b>邮箱</b>：<input type="text" placeholder="请填写邮箱" name="email" class="smz" value="'.$uses[email].'"/><br/>
<input class="submit" type="submit" name="adminpost" value="提交"/>
</form>  <a href="admin.php?action=email&act=post&email='.$uses[email].'">发送邮件</a>
</div>';

if($uses[mobile_d] == '1'){ $ax="CHECKED "; }else{ $bx="CHECKED "; }
echo '<div class="admin">手机号认证管理<br/></div>';
echo'<form method="POST" action="admin.php?action=user_renzheng&act=smsok&uid='.$uid.'&yzlx=mobile">
<b>认证设置</b>:
     <input type="radio" '.$ax.' name="mobile_d" value="1" />认证
     <input type="radio" '.$bx.' name="mobile_d" value="0" />未认证<br/>
<b>手机号</b>：<input type="text" placeholder="请填手机号" name="mobile" class="smz" value="'.$uses[mobile].'"/><br/>
<input class="submit" type="submit" name="adminpost" value="提交"/>
</form>  <a href="admin.php?action=sms&act=post&mobile='.$uses[mobile].'">发送短信</a>
</div><br/>';

}else{
echo '<div class="admin">未认证手机号<br/></div>';
   $num_count=$db->num_rows('user',"`mobile_d` ='2' ",'uid');
   $sql_bbs  =$db->query('user',"`mobile_d` ='2' ORDER BY `uid` ",'');
   while($row_c=mysql_fetch_array($sql_bbs)){
       echo"<div class=\"admin_a\">用户：<a href=\"index.php?$Bingz_ml=user&uid=$row_c[uid]\">$row_c[name]</a><br/>审核手机：$row_c[mobile]<br/>";
echo'<form method="POST" action="admin.php?action=user_renzheng&act=ok&lx=mobile&uid='.$row_c[uid].'">
审核提示:
     <input type="radio" name="name" value="1" />通过认证
     <input type="radio" name="name" value="0" />取消
<input class="submit" type="submit" name="B1" value="提交"/>
</form>
       </div>';
   }
   if($num_count == '0'){
   	  echo '<div class="admin_a">没有数据！</div>';
   }
######################
echo '<div class="admin">未认证邮箱<br/></div>';
   $num_count=$db->num_rows('user',"`email_d` ='2' ",'uid');
   $sql_bbs  =$db->query('user',"`email_d` ='2' ORDER BY `uid` ",'');
   while($row_c=mysql_fetch_array($sql_bbs)){
       echo"<div class=\"admin_a\">用户：<a href=\"index.php?$Bingz_ml=user&uid=$row_c[uid]\">$row_c[name]</a><br/>审核邮箱：$row_c[email]<br/>";
echo'<form method="POST" action="admin.php?action=user_renzheng&act=ok&lx=email&uid='.$row_c[uid].'">
审核提示:
     <input type="radio" name="name" value="1" />通过认证
     <input type="radio" name="name" value="0" />取消
<input class="submit" type="submit" name="B1" value="提交"/>
</form>
       </div>';
   }
   if($num_count == '0'){
   	  echo '<div class="admin_a">没有数据！</div>';
   }
######################
echo '<div class="admin">未认证QQ号<br/></div>';
   $num_count=$db->num_rows('user',"`qq_d` ='2' ",'uid');
   $sql_bbs  =$db->query('user',"`qq_d` ='2' ORDER BY `uid` ",'');
   while($row_c=mysql_fetch_array($sql_bbs)){
       echo"<div class=\"admin_a\">用户：<a href=\"index.php?$Bingz_ml=user&uid=$row_c[uid]\">$row_c[name]</a><br/>审核QQ：$row_c[qq]<br/>";
echo'<form method="POST" action="admin.php?action=user_renzheng&act=ok&lx=qq&uid='.$row_c[uid].'">
审核提示:
     <input type="radio" name="name" value="1" />通过认证
     <input type="radio" name="name" value="0" />取消
<input class="submit" type="submit" name="B1" value="提交"/>
</form>
       </div>';
   }
   if($num_count == '0'){
   	  echo '<div class="admin_a">没有数据！</div>';
   }
}
   echo "<a href=\"admin.php?action=user_renzheng&\">返回认证管理</a><br/>";
?>